package stud.aistar.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import stud.aistar.entity.Medicare;
import stud.aistar.mapper.MedicareMapper;
import stud.aistar.service.IMedicareService;

/**
 * @version 1.0
 * @Auther: git:jybdd - liming
 * @Description - 本类用于: 医保信息service实现类
 * @Date: 2019/9/28 19:29
 */
@Service
@Transactional
public class MedicareServiceImpl implements IMedicareService {

    @Autowired
    private MedicareMapper mapper;

    /**
     * 查看医保信息
     * @param id
     * @return
     */
    @Override
    public Medicare findByUserId(Integer id) {
        Medicare medicare = mapper.findByUserId(id);
        return medicare;
    }
    /**
     * 插入医保卡信息
     */
    @Override
    public void save(Medicare medicare) {
        mapper.save(medicare);
    }
}
